Skip to content

[breaking] Fix: lib list --fqbn and lib examples --fqbn do not show platform bundled lib when lib of same name is installed globally #2113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 22, 2023

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Mar 15, 2023

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

For details see #1566, and #1656

What is the current behavior?

$ arduino-cli lib list USBHost --all
Name    Installed   Available   Location              Description                                                               
USBHost 1.0.5       -           LIBRARY_LOCATION_USER -                                                                         
 "      1.0         1.0.5       arduino:[email protected]   Allows the communication with USB per...                                  
 "      1.0         1.0.5       things:[email protected]    Allows the communication with USB per...                                  

$ arduino-cli lib list USBHost --all --fqbn arduino:samd:mkrzero
No libraries installed.

$ arduino-cli lib examples USBHost --fqbn arduino:samd:mkr1000
Examples for library USBHost
  - /home/megabug/Arduino/libraries/USBHost/examples/ADKTerminalTest
  - /home/megabug/Arduino/libraries/USBHost/examples/KeyboardController
  - /home/megabug/Arduino/libraries/USBHost/examples/MouseController

What is the new behavior?

$ arduino-cli lib list USBHost --all
Name    Installed   Available   Location              Description                                                               
USBHost 1.0.5       -           LIBRARY_LOCATION_USER -                                                                         
 "      1.0         1.0.5       arduino:[email protected]   Allows the communication with USB per...                                  
 "      1.0         1.0.5       things:[email protected]    Allows the communication with USB per...                                  

$ arduino-cli lib list USBHost --all --fqbn arduino:samd:mkrzero
Name    Installed       Available     Location            Description                                                        
USBHost 1.0             1.0.5         arduino:[email protected] Allows the communication with USB per...                           

$ arduino-cli lib examples USBHost --fqbn arduino:samd:mkr1000
Examples for library USBHost (arduino:[email protected])
  - /home/megabug/.arduino15/packages/arduino/hardware/samd/1.8.13/libraries/USBHost/examples/ADKTerminalTest
  - /home/megabug/.arduino15/packages/arduino/hardware/samd/1.8.13/libraries/USBHost/examples/KeyboardController
  - /home/megabug/.arduino15/packages/arduino/hardware/samd/1.8.13/libraries/USBHost/examples/MouseController
  - /home/megabug/.arduino15/packages/arduino/hardware/samd/1.8.13/libraries/USBHost/examples/USB_desc

Does this PR introduce a breaking change, and is titled accordingly?

Yes, a public function in golang API has been removed.

Other information

Fix #1566
Fix #1656

@cmaglie cmaglie force-pushed the fix-arch-specific-libs-listing branch from 687bde3 to 46f6395 Compare March 15, 2023 23:13
@cmaglie cmaglie self-assigned this Mar 15, 2023
@cmaglie cmaglie added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Mar 15, 2023
@cmaglie cmaglie added this to the Arduino CLI 1.0 milestone Mar 15, 2023
@codecov
Copy link

codecov bot commented Mar 15, 2023

Codecov Report

Patch coverage: 16.66% and project coverage change: +0.05 🎉

Comparison is base (5f03cb9) 34.95% compared to head (4c8e0f7) 35.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2113      +/-   ##
==========================================
+ Coverage   34.95%   35.00%   +0.05%     
==========================================
  Files         232      232              
  Lines       20570    20556      -14     
==========================================
+ Hits         7190     7196       +6     
+ Misses      12531    12513      -18     
+ Partials      849      847       -2     
Flag Coverage Δ
unit 35.00% <16.66%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
arduino/libraries/libraries.go 47.16% <0.00%> (+3.69%) ⬆️
commands/lib/list.go 0.00% <0.00%> (ø)
internal/cli/lib/list.go 0.00% <0.00%> (ø)
arduino/libraries/librariesresolver/cpp.go 91.27% <100.00%> (ø)

... and 2 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@umbynos umbynos requested review from umbynos and Bikappa March 16, 2023 08:38
@cmaglie cmaglie requested a review from MatteoPologruto March 16, 2023 14:18
@cmaglie cmaglie force-pushed the fix-arch-specific-libs-listing branch from 46f6395 to 63ee372 Compare March 20, 2023 15:36
@cmaglie
Copy link
Member Author

cmaglie commented Mar 20, 2023

This patch also fixes #1656

@cmaglie cmaglie changed the title [breaking] Fix: lib list --fqbn does not shown platform bundled lib when lib of same name installed globally [breaking] Fix: lib list --fqbn and lib examples --fqbn do not show platform bundled lib when lib of same name is installed globally Mar 20, 2023
@cmaglie cmaglie force-pushed the fix-arch-specific-libs-listing branch from 63ee372 to 106ccc6 Compare March 20, 2023 17:23
@cmaglie cmaglie force-pushed the fix-arch-specific-libs-listing branch from 106ccc6 to 4c8e0f7 Compare March 22, 2023 08:17
@cmaglie cmaglie merged commit 0e29ec5 into arduino:master Mar 22, 2023
@cmaglie cmaglie deleted the fix-arch-specific-libs-listing branch March 22, 2023 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
2 participants